import React, { PropsWithChildren, ReactNode } from 'react';
import style from './index.module.scss';

export interface IFormLabelProps {
  label: string | ReactNode;
}

export function FormLabel(props: PropsWithChildren<IFormLabelProps>) {
  return (
    <div className={style.formLabelRoot}>
      <div className={style.formLabelLabel}>
        <span>{props.label}</span>
      </div>
      <div className={style.formLabelContainer}>{props.children}</div>
    </div>
  );
}
